DEFINITION OberObjects;

(* Created using OD 1.13 *)

IMPORT
  Exec,
  Sets,
  Intuition,
  Kernel,
  Utility,
  Graphics,
  InputEvent,
  GadTools,
  Dos,
  Errors,
  Events,
  ExecSupport,
  IntuiUtil,
  Strings,
  KeyMapLib,
  Timer;

CONST

  Add = 1;
  Change = 3;
  Continue = 1;
  LFALSE = 0;
  LTRUE = 1;
  Pass = 0;
  Remove = 2;
  Stop = 2;
  StopAll = 3;
  bgColor = -2141190091;
  busyPointer = -2141191191;
  drawMode = -2141190090;
  fgColor = -2141190092;
  gadHelp = -2141190182;
  gtExtraFlags = -2141190190;
  gtGadKind = -2141190191;
  gtGadget = -2141190192;
  normalPointer = -2141191192;
  obBase = -2141192192;
  obBottom = -2141192188;
  obBottomFromBottomofParent = -2141192182;
  obBottomFromBottomofPred = -2141192174;
  obBottomFromTopofParent = -2141192188;
  obBottomFromTopofPred = -2141192178;
  obHeight = -2141192186;
  obLeft = -2141192191;
  obLeftFromLeftofParent = -2141192191;
  obLeftFromLeftofPred = -2141192181;
  obLeftFromRightofParent = -2141192185;
  obLeftFromRightofPred = -2141192177;
  obRight = -2141192189;
  obRightFromLeftofParent = -2141192189;
  obRightFromLeftofPred = -2141192180;
  obRightFromRightofParent = -2141192184;
  obRightFromRightofPred = -2141192176;
  obText = -2141192172;
  obTop = -2141192190;
  obTopFromBottomofParent = -2141192183;
  obTopFromBottomofPred = -2141192175;
  obTopFromTopofParent = -2141192190;
  obTopFromTopofPred = -2141192179;
  obWidth = -2141192187;
  oberBarLabel = "????";

TYPE

  LabelType * = POINTER TO ARRAY OF Exec.STRPTR;

  OberCanvas * = POINTER TO OberCanvasDesc;

  OberCanvasDesc * = RECORD (OberObjectDesc)
    iObject - : Graphics.RastPortPtr;
    PROCEDURE (ob : OberCanvas) Init
      ( Name : ARRAY OF CHAR;
        tags : ObjTags;
        parent : OberObject );
    PROCEDURE (ob : OberCanvas) ReDisplay;
    PROCEDURE (ob : OberCanvas) SetDimensions
      ( x : INTEGER;
        y : INTEGER;
        w : INTEGER;
        h : INTEGER );
    PROCEDURE (ob : OberCanvas) MoveTo
      ( x : INTEGER;
        y : INTEGER );
    PROCEDURE (ob : OberCanvas) Show;
    PROCEDURE (ob : OberCanvas) Hide;
    PROCEDURE (ob : OberCanvas) Scroll
      ( x : INTEGER;
        y : INTEGER );
    PROCEDURE (ob : OberCanvas) SetFgColor
      ( color : SYSTEM.BYTE );
    PROCEDURE (ob : OberCanvas) SetBgColor
      ( color : SYSTEM.BYTE );
    PROCEDURE (ob : OberCanvas) SetDrawMode
      ( drMode : SYSTEM.BYTESET );
    PROCEDURE (ob : OberCanvas) WriteText
      ( text : ARRAY OF CHAR );
  END;

  OberCheckBox * = POINTER TO OberCheckBoxDesc;

  OberCheckBoxDesc * = RECORD (OberGadgetDesc)
    PROCEDURE (ob : OberCheckBox) Init
      ( Name : ARRAY OF CHAR;
        tags : ObjTags;
        parent : OberObject );
    PROCEDURE (ob : OberCheckBox) SetState
      ( checked : BOOLEAN );
    PROCEDURE (ob : OberCheckBox) GetState ()
      : BOOLEAN;
  END;

  OberCycleGadget * = POINTER TO OberCycleGadgetDesc;

  OberCycleGadgetDesc * = RECORD (OberGadgetDesc)
    Labels - : LabelType;
    NumLabels - : INTEGER;
    PROCEDURE (ob : OberCycleGadget) Init
      ( Name : ARRAY OF CHAR;
        tags : ObjTags;
        parent : OberObject );
    PROCEDURE (ob : OberCycleGadget) AddLabel
      ( Label : ARRAY OF CHAR );
    PROCEDURE (ob : OberCycleGadget) SetActive
      ( active : INTEGER );
    PROCEDURE (ob : OberCycleGadget) SetText
      ( Name : ARRAY OF CHAR );
    PROCEDURE (ob : OberCycleGadget) GetActive ()
      : INTEGER;
    PROCEDURE (ob : OberCycleGadget) GetText
      ( VAR Name : ARRAY OF CHAR );
  END;

  OberGadget * = POINTER TO OberGadgetDesc;

  OberGadgetDesc * = RECORD (OberObjectDesc)
    enabled - : BOOLEAN;
    iObject - : Intuition.ExtGadgetPtr;
    gadText - : POINTER TO ARRAY OF CHAR;
    PROCEDURE (ob : OberGadget) Init
      ( Name : ARRAY OF CHAR;
        tags : ObjTags;
        parent : OberObject );
    PROCEDURE (ob : OberGadget) ReDisplay;
    PROCEDURE (ob : OberGadget) SetAttr
      ( thetag : SYSTEM.LONGWORD;
        thevalue : LONGINT );
    PROCEDURE (ob : OberGadget) GetAttr
      ( thetag : SYSTEM.LONGWORD )
      : LONGINT;
    PROCEDURE (ob : OberGadget) SetText
      ( txt : ARRAY OF CHAR );
    PROCEDURE (ob : OberGadget) GetText
      ( VAR gadText : ARRAY OF CHAR );
    PROCEDURE (ob : OberGadget) SetDimensions
      ( x : INTEGER;
        y : INTEGER;
        w : INTEGER;
        h : INTEGER );
    PROCEDURE (ob : OberGadget) SetCallback
      ( cbp : cbProcType );
    PROCEDURE (ob : OberGadget) SetGadDownCallback
      ( cbp : cbProcType );
    PROCEDURE (ob : OberGadget) SetDblClkCallback
      ( cbp : cbProcType );
    PROCEDURE (ob : OberGadget) SetGadHelpCallback
      ( cbp : cbProcType );
    PROCEDURE (ob : OberGadget) Show;
    PROCEDURE (ob : OberGadget) Hide;
    PROCEDURE (ob : OberGadget) Enable;
    PROCEDURE (ob : OberGadget) Disable;
  END;

  OberGraphic * = POINTER TO OberGraphicDesc;

  OberGraphicDesc * = RECORD (OberObjectDesc)
  END;

  OberGroupBox * = POINTER TO OberGroupBoxDesc;

  OberGroupBoxDesc * = RECORD (VirtWindowDesc)
    PROCEDURE (ob : OberGroupBox) Init
      ( Name : ARRAY OF CHAR;
        tags : ObjTags;
        parent : OberObject );
    PROCEDURE (ob : OberGroupBox) Show;
    PROCEDURE (ob : OberGroupBox) Hide;
    PROCEDURE (ob : OberGroupBox) SetDimensions
      ( x : INTEGER;
        y : INTEGER;
        w : INTEGER;
        h : INTEGER );
    PROCEDURE (ob : OberGroupBox) SetText
      ( txt : ARRAY OF CHAR );
  END;

  OberIntegerGad * = POINTER TO OberIntegerGadDesc;

  OberIntegerGadDesc * = RECORD (OberGadgetDesc)
    PROCEDURE (ob : OberIntegerGad) Init
      ( Name : ARRAY OF CHAR;
        tags : ObjTags;
        parent : OberObject );
  END;

  OberListView * = POINTER TO OberListViewDesc;

  OberListViewDesc * = RECORD (OberGadgetDesc)
    NumLabels - : INTEGER;
    PROCEDURE (ob : OberListView) Init
      ( Name : ARRAY OF CHAR;
        tags : ObjTags;
        parent : OberObject );
    PROCEDURE (ob : OberListView) AddLabel
      ( Label : ARRAY OF CHAR );
    PROCEDURE (ob : OberListView) SetActive
      ( active : INTEGER );
    PROCEDURE (ob : OberListView) SetText
      ( text : ARRAY OF CHAR );
    PROCEDURE (ob : OberListView) GetActive ()
      : LONGINT;
    PROCEDURE (ob : OberListView) GetText
      ( VAR text : ARRAY OF CHAR );
    PROCEDURE (ob : OberListView) SetReadOnly
      ( IsRO : BOOLEAN );
  END;

  OberMenuItem * = POINTER TO OberMenuItemDesc;

  OberMenuItemDesc * = RECORD (OberObjectDesc)
    PROCEDURE (ob : OberMenuItem) SetState
      ( checked : BOOLEAN );
    PROCEDURE (ob : OberMenuItem) Enable;
    PROCEDURE (ob : OberMenuItem) Disable;
    PROCEDURE (ob : OberMenuItem) Hide;
    PROCEDURE (ob : OberMenuItem) Show;
  END;

  OberObject * = POINTER TO OberObjectDesc;

  OberObjectDesc * = RECORD 
    Parent - : OberObject;
    Name - : POINTER TO ARRAY OF CHAR;
    initialized - : BOOLEAN;
    tagList - : ObjTags;
    PROCEDURE (ob : OberObject) Hide;
    PROCEDURE (ob : OberObject) Show;
    PROCEDURE (ob : OberObject) IsVisible ()
      : BOOLEAN;
    PROCEDURE (ob : OberObject) GetText
      ( VAR text : ARRAY OF CHAR );
    PROCEDURE (ob : OberObject) AddToList;
    PROCEDURE (ob : OberObject) RemoveFromList;
    PROCEDURE (ob : OberObject) FindTag
      ( thetag : LONGINT )
      : Utility.TagItemPtr;
    PROCEDURE (ob : OberObject) SetTag
      ( thetag : LONGINT;
        thevalue : SYSTEM.LONGWORD;
        setIfFound : BOOLEAN );
    PROCEDURE (ob : OberObject) GetTagValue
      ( thetag : LONGINT;
        default : SYSTEM.LONGWORD )
      : LONGINT;
    PROCEDURE (ob : OberObject) CopyTag
      ( sourceTag : LONGINT;
        destTag : LONGINT );
    PROCEDURE (ob : OberObject) RemoveTag
      ( thetag : LONGINT );
    PROCEDURE (ob : OberObject) Init
      ( Name : ARRAY OF CHAR;
        tags : ObjTags;
        parent : OberObject );
  END;

  OberPaletteGad * = POINTER TO OberPaletteGadDesc;

  OberPaletteGadDesc * = RECORD (OberGadgetDesc)
    PROCEDURE (ob : OberPaletteGad) Init
      ( Name : ARRAY OF CHAR;
        tags : ObjTags;
        parent : OberObject );
  END;

  OberPort = POINTER TO OberPortDesc;

  OberPortDesc = RECORD (Events.GadToolsPortRec)
  END;

  OberPushButton * = POINTER TO OberPushButtonDesc;

  OberPushButtonDesc * = RECORD (OberGadgetDesc)
    PROCEDURE (ob : OberPushButton) Init
      ( Name : ARRAY OF CHAR;
        tags : ObjTags;
        parent : OberObject );
  END;

  OberRKDDesc * = RECORD 
    qualifier - : SYSTEM.WORDSET;
    key - : CHAR;
    PROCEDURE (ob : OberRawKeyDecoder) Init
      ( msg : Intuition.IntuiMessagePtr );
  END;

  OberRadioButton * = POINTER TO OberRadioButtonDesc;

  OberRadioButtonDesc * = RECORD (OberGadgetDesc)
    Labels - : LabelType;
    NumLabels - : INTEGER;
    PROCEDURE (ob : OberRadioButton) Init
      ( Name : ARRAY OF CHAR;
        tags : ObjTags;
        parent : OberObject );
    PROCEDURE (ob : OberRadioButton) AddLabel
      ( Label : ARRAY OF CHAR );
    PROCEDURE (ob : OberRadioButton) SetCallback
      ( cbp : cbProcType );
    PROCEDURE (ob : OberRadioButton) SetActive
      ( active : INTEGER );
    PROCEDURE (ob : OberRadioButton) SetText
      ( Name : ARRAY OF CHAR );
    PROCEDURE (ob : OberRadioButton) GetActive ()
      : INTEGER;
    PROCEDURE (ob : OberRadioButton) GetText
      ( VAR Name : ARRAY OF CHAR );
  END;

  OberRawKeyDecoder * = POINTER TO OberRKDDesc;

  OberScreen * = POINTER TO OberScreenDesc;

  OberScreenDesc * = RECORD (OberObjectDesc)
    iObject - : Intuition.ScreenPtr;
    Title - : POINTER TO ARRAY OF CHAR;
    PROCEDURE (ob : OberScreen) Init
      ( Name : ARRAY OF CHAR;
        tags : ObjTags;
        parent : OberObject );
  END;

  OberScrollerGad * = POINTER TO OberScrollerGadDesc;

  OberScrollerGadDesc * = RECORD (OberGadgetDesc)
    PROCEDURE (ob : OberScrollerGad) Init
      ( Name : ARRAY OF CHAR;
        tags : ObjTags;
        parent : OberObject );
  END;

  OberSliderGad * = POINTER TO OberSliderGadDesc;

  OberSliderGadDesc * = RECORD (OberGadgetDesc)
    PROCEDURE (ob : OberSliderGad) Init
      ( Name : ARRAY OF CHAR;
        tags : ObjTags;
        parent : OberObject );
  END;

  OberStaticNumber * = POINTER TO OberStaticNumberDesc;

  OberStaticNumberDesc * = RECORD (OberGadgetDesc)
    PROCEDURE (ob : OberStaticNumber) Init
      ( Name : ARRAY OF CHAR;
        tags : ObjTags;
        parent : OberObject );
  END;

  OberStaticText * = POINTER TO OberStaticTextDesc;

  OberStaticTextDesc * = RECORD (OberGadgetDesc)
    PROCEDURE (ob : OberStaticText) Init
      ( Name : ARRAY OF CHAR;
        tags : ObjTags;
        parent : OberObject );
  END;

  OberStringGad * = POINTER TO OberStringGadDesc;

  OberStringGadDesc * = RECORD (OberGadgetDesc)
    PROCEDURE (ob : OberStringGad) Init
      ( Name : ARRAY OF CHAR;
        tags : ObjTags;
        parent : OberObject );
  END;

  OberWindow * = POINTER TO OberWindowDesc;

  OberWindowDesc * = RECORD (VirtWindowDesc)
    iObject - : Intuition.WindowPtr;
    WinsPort - : OberPort;
    gtContext - : Intuition.GadgetPtr;
    LastGadget - : Intuition.GadgetPtr;
    vi - : SYSTEM.ADDRESS;
    NumMenuItems - : INTEGER;
    menuStrip - : Intuition.MenuPtr;
    PROCEDURE (ob : OberWindow) OnCreate;
    PROCEDURE (ob : OberWindow) SwitchHelp
      ( on : BOOLEAN );
    PROCEDURE (ob : OberWindow) Init
      ( Name : ARRAY OF CHAR;
        tags : ObjTags;
        parent : OberObject );
    PROCEDURE (ob : OberWindow) ModifyIDCMP
      ( Method : SHORTINT;
        IDCMP : SET )
      : BOOLEAN;
    PROCEDURE (ob : OberWindow) SetTitle
      ( Title : ARRAY OF CHAR );
    PROCEDURE (ob : OberWindow) SetDimensions
      ( x : INTEGER;
        y : INTEGER;
        w : INTEGER;
        h : INTEGER );
    PROCEDURE (ob : OberWindow) SetMinSize
      ( w : INTEGER;
        h : INTEGER );
    PROCEDURE (ob : OberWindow) SetMaxSize
      ( w : INTEGER;
        h : INTEGER );
    PROCEDURE (ob : OberWindow) Show;
    PROCEDURE (ob : OberWindow) Hide;
    PROCEDURE (ob : OberWindow) FindMenu
      ( Name : ARRAY OF CHAR )
      : OberMenuItem;
    PROCEDURE (ob : OberWindow) AddMenuTitle
      ( menuName : ARRAY OF CHAR;
        menuText : ARRAY OF CHAR );
    PROCEDURE (ob : OberWindow) AddMenuItem
      ( menuName : ARRAY OF CHAR;
        menuText : ARRAY OF CHAR;
        CbProc : cbProcType;
        menuKey : CHAR;
        MutualExclude : SET;
        IsAttr : BOOLEAN );
    PROCEDURE (ob : OberWindow) AddMenuSubItem
      ( menuName : ARRAY OF CHAR;
        menuText : ARRAY OF CHAR;
        CbProc : cbProcType;
        menuKey : CHAR;
        MutualExclude : SET;
        IsAttr : BOOLEAN );
    PROCEDURE (ob : OberWindow) AddMenuBar;
    PROCEDURE (ob : OberWindow) AddMenuBarSub;
    PROCEDURE (ob : OberWindow) CheckMenu
      ( Name : ARRAY OF CHAR );
    PROCEDURE (ob : OberWindow) UnCheckMenu
      ( Name : ARRAY OF CHAR );
    PROCEDURE (ob : OberWindow) EnableMenu
      ( Name : ARRAY OF CHAR );
    PROCEDURE (ob : OberWindow) DisableMenu
      ( Name : ARRAY OF CHAR );
    PROCEDURE (ob : OberWindow) Activate;
    PROCEDURE (ob : OberWindow) SetPointer
      ( pointerType : LONGINT );
    PROCEDURE (ob : OberWindow) SetHelpGroup
      ( win : OberWindow );
    PROCEDURE (ob : OberWindow) SetGadHelpCallback
      ( cbp : cbProcType );
    PROCEDURE (ob : OberWindow) OnSizeVerify
      ( msg : Intuition.IntuiMessagePtr )
      : INTEGER;
    PROCEDURE (ob : OberWindow) OnNewSize
      ( msg : Intuition.IntuiMessagePtr )
      : INTEGER;
    PROCEDURE (ob : OberWindow) OnRefreshWindow
      ( msg : Intuition.IntuiMessagePtr )
      : INTEGER;
    PROCEDURE (ob : OberWindow) OnMouseButtons
      ( msg : Intuition.IntuiMessagePtr )
      : INTEGER;
    PROCEDURE (ob : OberWindow) OnMouseMove
      ( msg : Intuition.IntuiMessagePtr )
      : INTEGER;
    PROCEDURE (ob : OberWindow) OnGadgetDown
      ( msg : Intuition.IntuiMessagePtr )
      : INTEGER;
    PROCEDURE (ob : OberWindow) OnGadgetUp
      ( msg : Intuition.IntuiMessagePtr )
      : INTEGER;
    PROCEDURE (ob : OberWindow) OnReqSet
      ( msg : Intuition.IntuiMessagePtr )
      : INTEGER;
    PROCEDURE (ob : OberWindow) OnMenuPick
      ( msg : Intuition.IntuiMessagePtr )
      : INTEGER;
    PROCEDURE (ob : OberWindow) OnCloseWindow
      ( msg : Intuition.IntuiMessagePtr )
      : INTEGER;
    PROCEDURE (ob : OberWindow) OnRawKey
      ( msg : Intuition.IntuiMessagePtr )
      : INTEGER;
    PROCEDURE (ob : OberWindow) OnReqVerify
      ( msg : Intuition.IntuiMessagePtr )
      : INTEGER;
    PROCEDURE (ob : OberWindow) OnReqClear
      ( msg : Intuition.IntuiMessagePtr )
      : INTEGER;
    PROCEDURE (ob : OberWindow) OnMenuVerify
      ( msg : Intuition.IntuiMessagePtr )
      : INTEGER;
    PROCEDURE (ob : OberWindow) OnNewPrefs
      ( msg : Intuition.IntuiMessagePtr )
      : INTEGER;
    PROCEDURE (ob : OberWindow) OnDiskInserted
      ( msg : Intuition.IntuiMessagePtr )
      : INTEGER;
    PROCEDURE (ob : OberWindow) OnDiskRemoved
      ( msg : Intuition.IntuiMessagePtr )
      : INTEGER;
    PROCEDURE (ob : OberWindow) OnActiveWindow
      ( msg : Intuition.IntuiMessagePtr )
      : INTEGER;
    PROCEDURE (ob : OberWindow) OnInactiveWindow
      ( msg : Intuition.IntuiMessagePtr )
      : INTEGER;
    PROCEDURE (ob : OberWindow) OnDeltaMove
      ( msg : Intuition.IntuiMessagePtr )
      : INTEGER;
    PROCEDURE (ob : OberWindow) OnVanillaKey
      ( msg : Intuition.IntuiMessagePtr )
      : INTEGER;
    PROCEDURE (ob : OberWindow) OnIntuiTicks
      ( msg : Intuition.IntuiMessagePtr )
      : INTEGER;
    PROCEDURE (ob : OberWindow) OnIdcmpUpdate
      ( msg : Intuition.IntuiMessagePtr )
      : INTEGER;
    PROCEDURE (ob : OberWindow) OnMenuHelp
      ( msg : Intuition.IntuiMessagePtr )
      : INTEGER;
    PROCEDURE (ob : OberWindow) OnChangeWindow
      ( msg : Intuition.IntuiMessagePtr )
      : INTEGER;
    PROCEDURE (ob : OberWindow) OnGadgetHelp
      ( msg : Intuition.IntuiMessagePtr )
      : INTEGER;
  END;

  ObjTags * = POINTER TO ARRAY OF Utility.TagItem;

  ObjectNode * = POINTER TO ObjectNodeDesc;

  ObjectNodeDesc * = RECORD 
    Object - : OberObject;
    Children - : ObjectNode;
    Sibling - : ObjectNode;
    PROCEDURE (node : ObjectNode) Find
      ( Name : ARRAY OF CHAR )
      : ObjectNode;
    PROCEDURE (node : ObjectNode) FindObject
      ( ob : OberObject )
      : ObjectNode;
  END;

  VirtWindow = POINTER TO VirtWindowDesc;

  VirtWindowDesc = RECORD (OberObjectDesc)
    Title - : POINTER TO ARRAY OF CHAR;
    parentWin - : OberWindow;
    PROCEDURE (ob : VirtWindow) RefreshWindow;
    PROCEDURE (ob : VirtWindow) FindGadget
      ( GadId : INTEGER )
      : OberGadget;
  END;

  cbProcType * = PROCEDURE
    ( ob : OberObject;
      SpecialCode : INTEGER );


(* PROCEDURES *)

PROCEDURE Clean
  ( VAR rc : LONGINT );
PROCEDURE Do;
PROCEDURE GetObject
  ( Name : ARRAY OF CHAR )
  : OberObject;
PROCEDURE RemoveNamedFromList
  ( Name : ARRAY OF CHAR );
PROCEDURE ReplyMsg
  ( msg : Intuition.IntuiMessagePtr );

END OberObjects.
